
package pos.control;

import pos.auth.Authentication;
import pos.exception.POSException;
import pos.interfaces.Messages;
import pos.util.Validate;

/**
 * A control object class that takes Customer Details from the boundary object and checks in the credentials
 * and valid or not
 * @author srikanth ramu
 */
public class CustomerDetailsControl implements Messages{


    /**
     * Checks if the cardnumber of phonenumber matches the customer details
     * @param cardNum
     * @param phoneNum
     * @throws POSException 
     */
    public boolean handleLogin(String cardNum, String phoneNum) throws POSException{
        Validate validate = new Validate();
        try{
            cardNum = validate.validTextInput(cardNum);
            phoneNum = validate.validTextInput(phoneNum);
            Authentication auth = new Authentication();
            
        }
        catch(POSException e){
            throw new POSException(Messages.NULLVALE, e);
        }
        return false;
    }
}
